package com.yanqu.road.server.cmd.activity;

import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.pb.activity.ShareProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = CrossProtocol.C_CROSS_SHARE_SYNC,desc = "")
public class SyncShareDataCmd extends CrossCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        ShareProto.SyncUserDataToInviterMsg syncMsg = ShareProto.SyncUserDataToInviterMsg.parseFrom(packet.getBytes());
        long serverId = syncMsg.getInviterServerId();
        YanQuMessage message = YanQuMessageUtils.buildMessage(GameProtocol.S_SHARE_SYNC_DATA, syncMsg);
        MessageHelper.sendPacket(serverId,0,message);
    }

    @Override
    public void sendData() {

    }
}
